package com.rbs.service.impl;

import com.rbs.entity.Book;
import com.rbs.mapper.BookMapper;
import com.rbs.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class BookServiceImpl implements BookService {
    @Autowired
    private BookMapper bookMapper;
    @Override
    public List<Book> selectByRecommend() {
        return bookMapper.selectByRecommend();
    }

    @Override
    public List<Book> selectByLike() {
        return bookMapper.selectByLike();
    }

    @Override
    public List<Book> selectByNew() {
        return bookMapper.selectByNew();
    }

    @Override
    public List<Book> selectByNewAndLike() {
        return bookMapper.selectByNewAndLike();
    }

    @Override
    public List<Book> selectByLevelTow(int cid) {
        return bookMapper.selectByLevelTow(cid);
    }

    @Override
    public List<Book> selectByLevelOne(int cid) {
        return bookMapper.selectByLevelOne(cid);
    }

    @Override
    public Book selectBookById(int bookId) {
        return bookMapper.selectBookById(bookId);
    }
}
